class Mail < ActiveRecord::Base
  named_scope :unsent, :conditions => ['sent = 0']

  def self.sendmail(sender, recipient, subject, body)
    mail = Mail.new
    mail.sender = sender
    mail.recipient = recipient
    mail.subject = subject
    mail.body = body
    mail.save
  end
end
